<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/MarkItUp.Master" 
Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="server">
  <% if( ViewData["Message"] != null ) {%>
      <%= ViewData["Message"] %>
  <%} %>
    <% Html.BeginForm();%>
    <h2>Login</h2>
    <label for="username"> Username </label>
    <input type="text" id="username" name="username"/>
    <br />
    <label for="password"> Password </label>
    
    <input type="password" id="password" name="password"/>    
  <input type="submit" value="Login" />
    <a href="javascript:Authorize();"> Login </a>
<% Html.EndForm();%>
<script type="text/javascript">
  function Authorize() {
    $.post('<%= Html.ResolveUrl("~/Account/Login") %>',
      { username: $("#username").val(), password: $("#password").val() },
      function(response) {

      }
      );
      
  }
</script>    
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
